<%-- 
    Document   : gianHangForm
    Created on : Oct 20, 2011, 5:55:52 PM
    Author     : nhlvu07db373
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html> 
    <div class="boxbody">
        <div class="capnhatsp">
            <spring:nestedPath path="gianHang">   
                <form action="submitgianhang.html" method="POST">

                    <div>
                        <spring:bind path="maGianHang">
                            <input type="hidden" name="${status.expression}" value="${status.value}"/>  
                        </spring:bind>
                    </div>                    
                    <div>
                        <label>Sản phẩm:</label>
                        <spring:bind path="maSanPham">
                            <select name="${status.expression}">
                                <option value="" selected >-->Sản phẩm<--</option>
                                <c:forEach items="${lstSP}" var="lsp"  >
                                    <option value="${lsp.maSanPham}" <c:if test="${status.value eq lsp.maSanPham }">selected</c:if>>${lsp.tenSanPham}</option>
                                </c:forEach>
                            </select>
                        </spring:bind>
                    </div>
                    <div>
                        <label>Khu vực:</label>
                        <spring:bind path="maKhuVuc">
                            <select name="${status.expression}">
                                <option value="" selected >-->Khu vực<--</option>
                                <c:forEach items="${lstKV}" var="lsp"  >
                                    <option value="${lsp.maKhuVuc}" <c:if test="${status.value eq lsp.maKhuVuc }">selected</c:if> >${lsp.tenKhuVuc}</option>
                                </c:forEach>
                            </select>
                        </spring:bind>
                    </div>                                     
                    <div>
                        <label>Giá gốc:</label>
                        <spring:bind path="giaGoc">
                            <input type="number" name="${status.expression}" value="${status.value}"/>
                        </spring:bind>
                    </div> 
                    <div>
                        <label>Khuyến mãi:</label>
                        <spring:bind path="khuyenMai">
                            <input type="number" name="${status.expression}" value="${status.value}"/>
                        </spring:bind>
                    </div>  
                    <div>
                        <label>Giá bán:</label>
                        <spring:bind path="giaBan">
                            <input type="number" name="${status.expression}" value="${status.value}"/>
                        </spring:bind>
                    </div> 
                    <div>
                        <label>Số lượng tối đa:</label>
                        <spring:bind path="soLuongToiDa">
                            <input type="number" name="${status.expression}" value="${status.value}"/>
                        </spring:bind>
                    </div>                    
                    <div>
                        <label>Ngày đăng:</label>
                        <spring:bind path="ngayDang">
                            <input type="text" name="${status.expression}" value="${status.value}"/>                           
                        </spring:bind>      
                    </div> 
                    <div>
                        <label>Ngày hết hạn:</label>
                        <spring:bind path="ngayHetHan">
                            <input type="text" name="${status.expression}" value="${status.value}"/>
                        </spring:bind>
                    </div>
                    <div>
                        <label>Tình trạng:</label>
                        <spring:bind path="tinhTrang">
                            <select name="">
                                <option value="" selected >Tình trạng</option>
                                <option value="0" <c:if test="${status.value eq 0 }">selected</c:if>>Ngưng bán</option>
                                <option value="1" <c:if test="${status.value eq 1 }">selected</c:if>>Đang bán</option>
                            </select> 
                        </spring:bind>
                    </div>              
                    <div><input type="submit" value="Lưu"/></div>         
                </form>
            </spring:nestedPath>
        </div>
    </div>
</html>
